package com.dragon.shop_user;

import com.alibaba.nacos.api.NacosFactory;
import com.alibaba.nacos.api.config.ConfigService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

import java.util.Properties;

@EnableFeignClients
// @EnableDiscoveryClient
@SpringBootApplication
public class ShopUserApplication {

	public static void main(String[] args) {
		SpringApplication.run(ShopUserApplication.class, args);
	}

	// public static void main(String[] args) throws Exception {
	// 	SpringApplication.run(ShopUserApplication.class, args);
	//
	// 	Properties properties = new Properties();
	// 	properties.put("serverAddr", "http://nacos.dragonsky.com");
	// 	properties.put("username", "nacos");
	// 	properties.put("password", "nacos");
	// 	properties.put("namespace", "4d88d1de-4318-4e87-bdb9-21f78532db29");
	//
	// 	ConfigService configService = NacosFactory.createConfigService(properties);
	// 	String content = configService.getConfig("shop-user-service-dev.yml", "shop", 5000);
	// 	System.out.println("Config Content: " + content);
	// }

}
